cmake_minimum_required(VERSION 3.15)
project(googletest)

set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
set(CMAKE_PREFIX_PATH ~/install)

find_package(GTest CONFIG REQUIRED)
if (GTest_FOUND)
    message("GTest found")
else ()
    message(FATAL_ERROR "Cannot find GTest")
endif ()

enable_testing()
add_subdirectory(test_1)
add_subdirectory(test_2)
add_subdirectory(testf_1)